import request from "@/common/request"
import smCrypto from "sm-crypto";

const path = '/client/c/user/'

export default {
  updatePassword(o, n) {
    return request.post(`${path}updatePassword`, {
      oldPassword: smCrypto.sm2.doEncrypt(o, '04298364ec840088475eae92a591e01284d1abefcda348b47eb324bb521bb03b0b2a5bc393f6b71dabb8f15c99a0050818b56b23f31743b93df9cf8948f15ddb54'),
      newPassword: smCrypto.sm2.doEncrypt(n, '04298364ec840088475eae92a591e01284d1abefcda348b47eb324bb521bb03b0b2a5bc393f6b71dabb8f15c99a0050818b56b23f31743b93df9cf8948f15ddb54'),
    }).then(_ => {
      uni.setStorageSync("token", "");
    })
  }
}
